package model

import (
	"github.com/jinzhu/gorm"
	"time"
)

type JobSeekersPosition struct {
	Id int64 `xorm:"pk autoincr"`
	JobSeekersId int64
	PositionId int64
	CreatedAt time.Time
	UpdatedAt time.Time
}

//func (jobSeekersPosition *JobSeekersPosition)InsertJobSeekersPosition(jsp *JobSeekersPosition, session *xorm.Session) error {
//
//	_, err := session.Insert(jsp)
//	if err != nil{
//		return err
//	}
//
//	return nil
//}

func (jobSeekersPosition *JobSeekersPosition)InsertJobSeekersPosition(jsp *JobSeekersPosition, tx *gorm.DB) error {

	err := tx.Create(jsp).Error
	if err != nil{
		return err
	}

	return nil
}